|
|
I just ran into something strange. While trying to
pass a color vector through a macro, the color changed!
The code is simple
#include "Colors.inc" #include "finish.inc"
#declare CapColor=<1,0,0,0,0>;
#macro Cap(Color)
difference
{
union {
cylinder{<0,0,0>,<0,.0889,0>,.17}
cylinder{<0,.0889,0>,<0,.1333,0>,.2}
cylinder{0,y*.0667,.12 translate y*.1333}
}
pigment{ rgbft Color} //Will promote to a 5 component vector
}
#end
camera { location <0,5,-5> look_at 0 angle 40 }
light_source { 0,White translate -z*40 rotate <30,-10,0> }
background { White}
object { Cap(CapColor) }
If I #declare CapColor= a three or four component vector, it works fine.
But as a five component vector something doesn't work so well.
Can anyone give some insight on this?
Post a reply to this message
|
|